#include <stdio.h>

#include "Heap.h"

int main()
{
    int array[] = {4, 5, 6, 8, 3, 1, 9};
    Heap hp;
    //HeapInit(&hp, array, sizeof(array)/sizeof(array[0]), Less); //小堆
    HeapInit(&hp, array, sizeof(array)/sizeof(array[0]), Greater); //大堆

    printf("Top = %d\n", HeapTop(&hp));
    printf("size = %d\n", HeapSize(&hp));

    HeapInsert(&hp, 0);
    printf("Top = %d\n", HeapTop(&hp));
    printf("size = %d\n", HeapSize(&hp));

    HeapErase(&hp);
    printf("Top = %d\n", HeapTop(&hp));
    printf("size = %d\n", HeapSize(&hp));
}
